
#ifndef CHATPROJECT_MOVEFRAMELESSWIDGET_H
#define CHATPROJECT_MOVEFRAMELESSWIDGET_H

#include <QWidget>

class MoveFramelessWidget : public QWidget
{
    Q_OBJECT
public:
    explicit MoveFramelessWidget(QWidget *parent = nullptr);
    ~MoveFramelessWidget() override;

protected:
    void mousePressEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
    void paintEvent(QPaintEvent *event) override;

private:
    QPoint window_pos_;
    QPoint diff_pos_;
};


#endif //CHATPROJECT_MOVEFRAMELESSWIDGET_H
